const Product = require('../../../table/mongo/product');

module.exports = async function (req, res) {
    let id = req.params.id;
    try {
        let data = await Product.remove({_id: id});
        res.success('删除成功', data);
    }catch(e) {
        res.error(e)
    }
}